﻿@{
	string FlowID = Request.QueryString["flowid"];
	string StepID = Request.QueryString["stepid"];
	string GroupID = Request.QueryString["groupid"];
	string TaskID = Request.QueryString["taskid"];
	string InstanceID = Request.QueryString["instanceid"];
	string DisplayModel = Request.QueryString["display"] ?? "0";
	string DBConnID = "06075250-30dc-4d32-bf97-e922cb30fac8";
	string DBTable = "OaEvectionList";
	string DBTablePK = "ID";
	string DBTableTitle = "";
	if(InstanceID.IsNullOrEmpty()){InstanceID = Request.QueryString["instanceid1"];}
	YJ.Platform.Dictionary BDictionary = new YJ.Platform.Dictionary();
	YJ.Platform.WorkFlow BWorkFlow = new YJ.Platform.WorkFlow();
	YJ.Platform.WorkFlowTask BWorkFlowTask = new YJ.Platform.WorkFlowTask();
	string fieldStatus = BWorkFlow.GetFieldStatus(FlowID, StepID);
	LitJson.JsonData initData = BWorkFlow.GetFormData(DBConnID, DBTable, DBTablePK, InstanceID, fieldStatus, "{\"oaevectionlist.startdate\":\"yyyy-MM-dd HH:mm\",\"oaevectionlist.enddate\":\"yyyy-MM-dd HH:mm\"}");
	string TaskTitle = BWorkFlow.GetFromFieldData(initData, DBTable, DBTableTitle);
}
<link href="~/Scripts/FlowRun/Forms/flowform.css" rel="stylesheet" type="text/css" />
<script src="~/Scripts/FlowRun/Forms/common.js" type="text/javascript" ></script>
<input type="hidden" id="Form_ValidateAlertType" name="Form_ValidateAlertType" value="1" />
<input type="hidden" id="Form_TitleField" name="Form_TitleField" value="OaEvectionList." />
<input type="hidden" id="Form_DBConnID" name="Form_DBConnID" value="06075250-30dc-4d32-bf97-e922cb30fac8" />
<input type="hidden" id="Form_DBTable" name="Form_DBTable" value="OaEvectionList" />
<input type="hidden" id="Form_DBTablePk" name="Form_DBTablePk" value="ID" />
<input type="hidden" id="Form_DBTableTitle" name="Form_DBTableTitle" value="" />
<input type="hidden" id="Form_AutoSaveData" name="Form_AutoSaveData" value="1" />
<textarea id="Form_DBTableTitleExpression" name="Form_DBTableTitleExpression" style="display:none;width:0;height:0;"></textarea>
<script type="text/javascript">
	var initData = @Html.Raw(BWorkFlow.GetFormDataJsonString(initData));
	var fieldStatus = "1"=="@Request.QueryString["isreadonly"]" ? {} : @Html.Raw(fieldStatus);
	var displayModel = '@DisplayModel';
	$(window).load(function (){
		formrun.initData(initData, "OaEvectionList", fieldStatus, displayModel);
	});
</script>
<p><br/></p><link href="~/Content/Theme/tablenew.css" rel="stylesheet"/><link href="/Content/Theme/blue/Style/style.css" rel="stylesheet"/><table class="flowformtable tableF table table-bordered" data-sort="sortDisabled" cellspacing="0" cellpadding="0" align="center"><tbody><tr class="firstRow"><th rowspan="1" colspan="2" style="word-break: break-all;" valign="middle" align="center"><span class="title">出差详情</span></th></tr><tr><th class="titleT" rowspan="1" colspan="2" valign="middle" align="left"><br/></th></tr><tr class="topTr"><td class="top" rowspan="1" colspan="1" valign="middle" align="left"><p class="txt">省</p><select class="myselect" id="OaEvectionList.Province" name="OaEvectionList.Province" isflow="1" type1="flow_select" linkagefield="OaEvectionList.City" linkagesource="sql" linkagesourcetext="select distinct City   from OaRegion where Province = '$queryform&value&$'" linkagesourceconn="06075250-30dc-4d32-bf97-e922cb30fac8" onchange="RoadUI.Core.loadOptions(this);"><option value=""></option>@Html.Raw(new YJ.Platform.WorkFlowForm().GetOptionsFromSql("06075250-30dc-4d32-bf97-e922cb30fac8", "select distinct Province from OaRegion", ""))</select></td><td class="top" rowspan="1" colspan="1" valign="middle" align="left"><p class="txt">市</p><select class="myselect" id="OaEvectionList.City" name="OaEvectionList.City" isflow="1" type1="flow_select" linkagefield="OaEvectionList.Area" linkagesource="sql" linkagesourcetext="select distinct Area from OaRegion where City = '$queryform&value&$'" linkagesourceconn="06075250-30dc-4d32-bf97-e922cb30fac8" onchange="RoadUI.Core.loadOptions(this);"><option value=""></option>@Html.Raw(BDictionary.GetOptionsByID("".ToGuid(), YJ.Platform.Dictionary.OptionValueField.ID, "", false))</select></td></tr><tr><td rowspan="1" colspan="1" valign="middle" align="left"><p class="txt">区</p><select class="myselect" id="OaEvectionList.Area" name="OaEvectionList.Area" isflow="1" type1="flow_select" linkagefield="null" linkagesource="sql" linkagesourcetext="" linkagesourceconn="06075250-30dc-4d32-bf97-e922cb30fac8" onchange="RoadUI.Core.loadOptions(this);"><option value=""></option>@Html.Raw(BDictionary.GetOptionsByID("".ToGuid(), YJ.Platform.Dictionary.OptionValueField.ID, "", false))</select></td><td rowspan="1" colspan="1" align="left"><p class="txt">总公里数(全程)</p><input type="text" id="OaEvectionList.Distance" type1="flow_text" name="OaEvectionList.Distance" value="" valuetype="4" align="left" isflow="1" class="mytext" title=""/>公里</td></tr><tr><td rowspan="1" colspan="1"><p class="txt">开始日期</p><input name="OaEvectionList.StartDate" id="OaEvectionList.StartDate" value="" type1="flow_datetime" currentmonth="0" dayafter="0" daybefor="0" istime="1" defaultvalue="" format="yyyy-MM-dd HH:mm" type="text" isflow="1" class="mycalendar" title="" onchange="onchange_36db9fdc52193edf2d6b4b2e09dd3963 (this);"/><script type="text/javascript">function onchange_36db9fdc52193edf2d6b4b2e09dd3963(srcObj){var sdate = $(srcObj).val();
var edate = document.getElementById("OaEvectionList.EndDate").value;
if(edate.replace(/(^s*)|(s*$)/g, "").length == 0) {
		return;
} else {
	var time1 = Date.parse(sdate);
	var time2 = Date.parse(edate);
	var days = Math.abs(parseInt((time2 - time1) / 1000 / 3600 / 24));
	if(days <= 0) {
		days++;
	}
	document.getElementById("OaEvectionList.Days").value = days;
}}</script></td><td rowspan="1" colspan="1"><p class="txt">结束日期</p><input type="text" type1="flow_datetime" id="OaEvectionList.EndDate" name="OaEvectionList.EndDate" value="" format="yyyy-MM-dd HH:mm" defaultvalue="" istime="1" daybefor="0" dayafter="0" currentmonth="0" isflow="1" class="mycalendar" title="" onchange="onchange_539b95be447fbd451c0e030aec07623f (this);"/><script type="text/javascript">function onchange_539b95be447fbd451c0e030aec07623f(srcObj){var edate = $(srcObj).val();
var sdate = document.getElementById("OaEvectionList.StartDate").value;
if(sdate.replace(/(^s*)|(s*$)/g, "").length == 0) {
	return;
} else {
	var time1 = Date.parse(sdate);
	var time2 = Date.parse(edate);
	var days = Math.abs(parseInt((time2 - time1) / 1000 / 3600 / 24));
	if(days <= 0) {
		days++;
	}
	document.getElementById("OaEvectionList.Days").value = days;
}}</script></td></tr><tr><td rowspan="1" colspan="1" valign="middle" align="left"><p class="txt">出差天数</p><input type="text" id="OaEvectionList.Days" type1="flow_text" name="OaEvectionList.Days" value="" valuetype="4" align="left" isflow="1" class="mytext" title=""/>天</td><td id="tr1" rowspan="1" colspan="1" valign="middle" align="left"><p class="txt">住宿天数</p><input name="OaEvectionList.HouseDays" id="OaEvectionList.HouseDays" value="" type1="flow_text" valuetype="1" type="text" align="left" isflow="1" class="mytext" title=""/>天<br/></td></tr><tr class="bottomTr"><td class="bottom Tradio" rowspan="1" colspan="2" valign="middle" align="left"><p class="txt">交通工具</p><input type="radio" name="OaEvectionList.Vehicle" id="OaEvectionList.Vehicle_0" value="飞机" style="vertical-align:middle;" isflow="1" type1="flow_radio"/><label for="OaEvectionList.Vehicle_0" style="vertical-align:middle;margin-right:3px;">飞机</label><input type="radio" name="OaEvectionList.Vehicle" id="OaEvectionList.Vehicle_1" value="火车/动车" style="vertical-align:middle;" isflow="1" type1="flow_radio"/><label for="OaEvectionList.Vehicle_1" style="vertical-align:middle;margin-right:3px;">火车/动车</label><input type="radio" name="OaEvectionList.Vehicle" id="OaEvectionList.Vehicle_2" value="长途汽车" style="vertical-align:middle;" isflow="1" type1="flow_radio"/><label for="OaEvectionList.Vehicle_2" style="vertical-align:middle;margin-right:3px;">长途汽车</label><input type="radio" name="OaEvectionList.Vehicle" id="OaEvectionList.Vehicle_3" value="公司公车" style="vertical-align:middle;" isflow="1" type1="flow_radio"/><label for="OaEvectionList.Vehicle_3" style="vertical-align:middle;margin-right:3px;">公司公车</label><input type="radio" name="OaEvectionList.Vehicle" id="OaEvectionList.Vehicle_4" value="私车" style="vertical-align:middle;" isflow="1" type1="flow_radio"/><label for="OaEvectionList.Vehicle_4" style="vertical-align:middle;margin-right:3px;">私车</label><input type="radio" name="OaEvectionList.Vehicle" id="OaEvectionList.Vehicle_5" value="其他" style="vertical-align:middle;" isflow="1" type1="flow_radio"/><label for="OaEvectionList.Vehicle_5" style="vertical-align:middle;margin-right:3px;">其他</label></td></tr></tbody></table>